From afcf3e66f653bfc30f11d40b1c30324a21823e30 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 24 Feb 2019 18:41:26 -0500 Subject: [PATCH] widget: guard popover-specific code paths This is essentially a special case just for GtkPopover, which is the last widget with a child surface. --- gtk/gtkwidget.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 0bdbf2ed8e..4f1d444cec 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4439,7 +4439,8 @@ gtk_widget_allocate (GtkWidget *widget, { /* Still have to move the window... */ if (_gtk_widget_get_realized (widget) && - _gtk_widget_get_has_surface (widget)) + _gtk_widget_get_has_surface (widget) && + GTK_IS_POPOVER (widget)) { GtkAllocation window_alloc; @@ -4652,7 +4653,8 @@ gtk_widget_real_size_allocate (GtkWidget *widget, GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); if (_gtk_widget_get_realized (widget) && - _gtk_widget_get_has_surface (widget)) + _gtk_widget_get_has_surface (widget) && + GTK_IS_POPOVER (widget)) { GtkAllocation window_alloc; -- 2.30.2